Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#530]: Profile avatar is now either Github profile picture, or capitalized first letter of username #534

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Mehdi-Messaadi
Copy link
Contributor

If the user signs in with Github, their profile avatar will automatically become their GitHub profile picture, like this screenshot below:

github profile picture

Otherwise, if the user signed in traditionally, then the first letter of their username will be capitalized and used as avatar to enhance UX, as show in the screenshot below:

No github

Copy link
Contributor

@sergiozeppo sergiozeppo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Mehdi!
Good work! This is exactly what I talked about!
You need to fix some lint and prettier errors in your solution

Comment on lines 30 to 32
x="50%"
y="52%"
textAnchor="middle"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move up textAnchor prop above x and y

imageExists(url).then((exists) => setGithubExists(exists));
}, [username]);

//This function takes the first letter of the username and converts it to uppercase
Copy link
Contributor

@sergiozeppo sergiozeppo Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a whitespace between // construction and text of comment

//This function takes the first letter of the username and converts it to uppercase
const capitalizeFirstLetter = (string) => {
return string.charAt(0).toUpperCase();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add ;

@fey
Copy link
Contributor

fey commented Jul 25, 2024

Hi, thanks for participating! Please see the tests, what needs to be fixed.
Let's create an issue for the backend, so that we get a URL with a picture from the backend, and if there is no picture, there would be some kind of stub

@Mehdi-Messaadi
Copy link
Contributor Author

Mehdi-Messaadi commented Jul 25, 2024

Hi @sergiozeppo!
Thanks a lot for the remarks. I believe they're all fixed now.
Hey @fey! The tests have been successfully passed now.

@dzencot
Copy link
Collaborator

dzencot commented Jul 25, 2024

Hi! It has one problem: the username can be occupied by another user. Anyone can enter any username. So, we need to add this feature to the backend.

@sergiozeppo
Copy link
Contributor

Hi! It has one problem: the username can be occupied by another user. Anyone can enter any username. So, we need to add this feature to the backend.

Hi @dzencot ! The problem is really is, but I don't think that it's related both to this issue or PR.
This is a separate issue, I think.

@fey
Copy link
Contributor

fey commented Jul 26, 2024

Let's draw a simple picture (no copyright) and display it instead of the avatar? And create a separate task to request the avatar url.

@dzencot dzencot marked this pull request as draft November 12, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants